package models

import (
	"github.com/goravel/framework/database/orm"
	"github.com/goravel/framework/support/carbon"
)

type Staff struct {
	orm.Model
	SiteID        uint   `gorm:"column:site_id;type:int(11);not null;comment:'站点ID'" form:"site_id" json:"site_id"`
	No            int    `gorm:"column:no;type:int(30);not null;comment:'员工编号'" form:"no" json:"no"`
	Name          string `gorm:"column:name;type:varchar(20);not null;comment:'姓名'" form:"name" json:"name"`
	Position      string `gorm:"column:position;type:varchar(20);default:null;comment:'职务'" form:"position" json:"position"`
	Pinyin        string `gorm:"column:pinyin;type:varchar(20);default:null;comment:'拼音码'" form:"pinyin" json:"pinyin"`
	DepartmentID  uint   `gorm:"column:department_id;default:null;comment:'部门ID'" form:"department_id" json:"department_id"`
	Department    *Department
	DiscountLimit string      `gorm:"column:discount_limit;type:varchar(100);default:null;comment:'优惠限额'" form:"discount_limit" json:"discount_limit"`
	MinDiscount   string      `gorm:"column:min_discount;type:varchar(100);default:null;comment:'最低折扣下限'" form:"min_discount" json:"min_discount"`
	Birthday      carbon.Date `gorm:"column:birthday;type:date;default:null;comment:'生日'" form:"birthday" json:"birthday"`
	Tel           string      `gorm:"column:tel;type:varchar(50);default:null;comment:'电话'" form:"tel" json:"tel"`
	Status        int         `gorm:"column:status;type:int(10);default:1;comment:'状态0:禁用,1:启用'" form:"status" json:"status"`
	Remark        string      `gorm:"column:remark;type:varchar(100);default:null;comment:'备注'" form:"remark" json:"remark"`
}
